commonlibsse_ng\re\e/
ExtraCharge.rs1use crate::re::BSExtraData::DerivedBSExtraData;
2use crate::re::offsets_rtti::RTTI_ExtraCharge;
3use crate::re::offsets_vtable::VTABLE_ExtraCharge;
4use crate::re::{BSExtraData::BSExtraData, ExtraDataType::ExtraDataType};
5use crate::rel::id::VariantID;
6
7#[repr(C)]
8#[derive(Debug, PartialEq)]
9pub struct ExtraCharge {
10 pub __base: BSExtraData,
11
12 pub charge: f32,
14
15 pub pad14: u32,
17}
18
19const _: () = {
20 assert!(core::mem::offset_of!(ExtraCharge, __base) == 0x0);
21 assert!(core::mem::offset_of!(ExtraCharge, charge) == 0x10);
22 assert!(core::mem::offset_of!(ExtraCharge, pad14) == 0x14);
23 assert!(core::mem::size_of::<ExtraCharge>() == 0x18);
24};
25
26impl Default for ExtraCharge {
27 #[inline]
28 fn default() -> Self {
29 Self::new()
30 }
31}
32
33impl DerivedBSExtraData for ExtraCharge {
34 #[inline]
35 fn get_extra_data(&self) -> &BSExtraData {
36 &self.__base
37 }
38
39 #[inline]
40 fn get_extra_data_type() -> ExtraDataType {
41 Self::EXTRA_DATA_TYPE
42 }
43}
44
45impl ExtraCharge {
46 pub const RTTI: VariantID = RTTI_ExtraCharge;
48
49 pub const VTABLE: [VariantID; 1] = VTABLE_ExtraCharge;
51
52 pub const EXTRA_DATA_TYPE: ExtraDataType = ExtraDataType::Charge;
54
55 #[inline]
57 pub const fn new() -> Self {
58 Self { __base: BSExtraData::new(), charge: 0.0, pad14: 0 }
59 }
60
61 #[inline]
66 pub const fn get_type(&self) -> ExtraDataType {
67 ExtraDataType::Charge
68 }
69}
70
71#[repr(C)]
75pub struct ExtraChargeVtbl {
76 pub CxxDrop: fn(this: &mut ExtraCharge),
78
79 pub GetType: fn(this: &ExtraCharge) -> ExtraDataType,
81
82 pub IsNotEqual: fn(this: &ExtraCharge, rhs: &ExtraCharge) -> bool,
84}
85
86impl Default for ExtraChargeVtbl {
87 #[inline]
88 fn default() -> Self {
89 Self::new()
90 }
91}
92
93impl ExtraChargeVtbl {
94 #[inline]
96 pub const fn new() -> Self {
97 const fn CxxDrop(_this: &mut ExtraCharge) {}
98
99 const fn GetType(_this: &ExtraCharge) -> ExtraDataType {
100 ExtraCharge::EXTRA_DATA_TYPE
101 }
102
103 const fn IsNotEqual(_this: &ExtraCharge, _rhs: &ExtraCharge) -> bool {
104 false
105 }
106
107 Self { CxxDrop, GetType, IsNotEqual }
108 }
109}